import request from '@/utils/request'
import qs from 'qs'

// 保存节点数据
export function save(data,id) {
    return request({
        url: '/model/'+id+'/save',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
        },
        method: 'put',
        data: qs.stringify(data)
    })
}

// 流程数据回显
export function getLcData(id){
    return request({
        url: '/model/'+id+'/json',
        method: 'get',
    })
}

//查询组织机构树
export function selectZzjgTree() {
    return request({
        url: '/server/common/selectZzjgTree.do',
        method: 'get',
    })
}

// 查询组织机构下的用户
export function selectYhListByZzjg(data) {
    return request({
        url: '/server/platform/zzjggl/yhgl/selectYhListByZzjg.do',
        method: 'get',
        params: data
    })
}

// 查询系统角色
export function selectQxglJsqx(data) {
    return request({
        url: '/server/platform/qxgl/qxcx/selectQxglJsqx.do',
        method: 'get',
        params: data
    })
}

// 查询流程条件
export function getFlowFormColumns(data) {
    return request({
        url: '/pt_flow_form/pt-flow-form/getFlowFormColumns.do',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
        },
        data: qs.stringify(data)
    })
}

// 查询权限设置的内容
export function getFlowFormById(data){
    return request({
        url: '/pt_flow_form/pt-flow-form/getFlowFormById.do',
        method: 'get',
        params: data
    })
}

